package com.reindeer.common;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(Exception.class)
    public JsonResult<String> exceptionHandler(Exception e) {
        log.error(e.getMessage(), e);
        return JsonResult.error("系统异常，请稍后再试");
    }
} 